<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/view/common/common.jsp" %>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link href="${ctx}/resources/mallcss/initcss.css" rel="stylesheet">
    <link href="${ctx}/resources/mallcss/common.css" rel="stylesheet">
    <style rel="stylesheet">

        .con {
            background-color: #e8e8e8;
            overflow: hidden;
        }

        header {
            height: 3.7em;
            background-color: #f03792;
            position: relative;
            text-align: center;
        }

        .Return, .Home {
            position: absolute;
            top: 0;
            width: 3.7em;
            height: 3.7em;
        }

        .Return {
            left: 0;
        }

        .Home {
            right: 0;
        }

        .Return span, .Home span {
            background: url("${ctx}/resources/mallimages/png.png");
            background-size: 17em;
            width: 1.7em;
            height: 1.7em;
            position: absolute;
            top: 1em;
            left: 1em;
        }

        .Return span {
            background-position: -0.17em -5.5em;
        }

        .Home span {
            background-position: -0.17em -8.1em;
        }

        .Title {
            font-size: 1.3em;
            line-height: 2.8em;
            color: white;

        }

        .itemsTitle {
            background-color: white;
            margin-top: 0.5em;
            height: 2.5em;
            border-bottom: 1px dashed #dedede;
        }

        .itemsTitle ul {
            overflow: hidden;
        }

        .itemsTitle ul li {
            width: 33%;
            float: left;
            text-align: center;
            font-size: 1em;
            line-height: 2.5em;
            white-space: nowrap;
            overflow: hidden;
        }

        .result {
            background-color: white;
            padding: 1em 1em 0.5em;
        }

        .result p {
            padding-top: 0.5em;
        }

        .filter {
            background: white;
            height: 4em;
            position: relative;
        }

        .filter ul {
            position: absolute;
            bottom: 0em;
            width: 100%;
        }

        .filter ul li {
            font-size: 0.9em;
            width: 25%;
            float: left;
            text-align: center;
        }

        .filter ul li.activity {
            border-bottom: 1px solid;
            padding-bottom: 1em;
        }

        .filter ul li.activity a {
            color: red;

        }

        .accounts ul li {
            background-color: #FEFFFE;
            border-bottom: 1px solid #ebebeb;
            padding: 0.5em 0.5em;
            overflow: hidden;
            position: relative;

        }

        .accounts ul li img {
            width: 4em;
            border-radius: 4em;
            float: left;
        }

        .accounts .accountsInfo {
            margin-left: 1em;
            display: inline-block;
            padding-top: 0.6em;
        }

        .accounts .accountsInfo h4 {
            color: #a5a5a5;
            padding-top: 0.8em;

        }

        .accounts .accountsInfo h3.hidden {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 5em;

        }


    </style>
    <title>订单记录</title>
</head>
<body>
<div class="con">
    <div class="carts">
        <c:forEach items="${items}" var="cart">
            <hr style= "border:1px dashed #b8cba5" />
            <div class="cart">
                <div class="itemsTitle">
                    <ul>
                        <li><span class="from">商城中心</span></li>
                        <li><span class="time"><fmt:formatDate value="${cart.updateTime}"
                                                               pattern="yyyy-M-d H:m"/></span></li>
                        <li><span class="to">${cart.user.realName}</span></li>
                    </ul>
                </div>

                <div class="accounts">
                    <ul>
                        <c:forEach items="${cart.items}" var="item">
                            <%--<c:if test="${cart.items == null}">--%>
                            <li class="item" data-id="${item.pmallGoods.id}">
                                <img src="${dmzImgPath}${item.pmallGoods.imgFile}" alt="">
                                <div class="accountsInfo">
                                    <h3><span>${item.pmallGoods.name}</span></h3>
                                    <h4>数量:X${item.quantity}&nbsp;</h4>
                                </div>
                                <div class="price accountsInfo" style="float: right;margin-left: 0">
                                        <%--<h3><span>${item.price}￥</span></h3>--%>
                                    <h4><i>
                                        <span>￥${item.pmallGoods.retailPrice}</span>
                                    </i></h4>
                                </div>
                                    <%--<div class="operate" style="display: none">--%>
                                    <%--<div class="inputs">--%>
                                    <%--<span class="reduce">-</span>--%>
                                    <%--<input class="amount" type="text" value="0">--%>
                                    <%--<span class="add">+</span>--%>
                                    <%--</div>--%>
                                    <%--<div class="delete">--%>
                                    <%--<span>删除</span>--%>
                                    <%--</div>--%>
                                    <%--</div>--%>
                                    <%--<i  class="fa fa-check-circle" aria-hidden="true"></i>--%>
                            </li>
                        <%--</c:if>--%>
                        </c:forEach>
                    </ul>
                </div>


                <div class="result">
                    <span>订单ID : </span> <span>${cart.id}</span>
                    <c:if test="${cart.logisticsCode != '' || cart.logisticsCode != null}">
                    <span style="float: right;color: red">
                        ${cart.logisticsCode} : ${cart.logistics}
                    </span>
                    </c:if>

                    <c:if test="${cart.logisticsCode == '' || cart.logisticsCode == null}">
                    <span data-id="${cart.id}" class="deleteDelivery" style="float: right;color: red">
                        暂未发货
                    </span>
                    </c:if>

                    <%--<c:if test="${cart.status.desc ne '已发货'&&cart.address.country ne '中国'}">--%>
                      <%--<span data-id="${cart.id}" class="" style="float: right;color: red">--%>
                        <%--暂未发货/退货找管理员--%>
                    <%--</span>--%>
                    <%--</c:if>--%>

                    <p>
                        收货人：${cart.addressClone.consignee} &nbsp;&nbsp;&nbsp;&nbsp; 电话：${cart.addressClone.mobile}
                    </p>
                    <p>
                        收货地址：${cart.addressClone.province}${cart.addressClone.city}${cart.addressClone.county}${cart.addressClone.address}
                    </p>
                        <%--<h4>地址:${cart.address.province}${cart.address.city}${cart.address.county}${cart.address.address}${cart.address.mobile}</h4>--%>
                    <%--<h4 style="padding-top: 0.5em">--%>
                        <%--地址: ${cart.addressClone.address}，电话:${cart.addressClone.mobile}，收货人:${cart.addressClone.consignee}</h4>--%>
                    <%--<p>--%>
                            <%--&lt;%&ndash;${cart.logistics}:${cart.logisticsCode}&ndash;%&gt;--%>

                    <%--</p>--%>
                </div>
            </div>
            <hr style= "border:1px dashed #b8cba5" />
        </c:forEach>



    </div>
</div>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>

    <%--$(function () {--%>
        <%--$(".deleteDelivery").click(function () {--%>

            <%--if (!confirm("是否确定删除")) return;--%>

            <%--var id = $(this).attr("data-id");--%>
            <%--var url = "<c:url value="/delivery/remove.json"/>";--%>
            <%--$.post(url, {"id": id},--%>
                <%--function (data, status, jqXHR) {--%>
                    <%--var m = data;--%>
                    <%--if (m.flag == "0") {--%>
                        <%--alert("删除成功!");--%>
                        <%--window.location.href = "<c:url value='/mobile/delivery/records.html'/>";--%>
                    <%--} else {--%>
                        <%--alert("操作失败" + m.message);--%>
<%--//                        window.location.reload();--%>
                    <%--}--%>
                <%--}).fail(function (xhr) {--%>
                <%--if (xhr.status == 401) {--%>
                    <%--window.location.href = xhr.getResponseHeader("Location");--%>
                <%--} else {--%>
                    <%--console.log(xhr);--%>
                    <%--alert("未知错误请联系管理员" + xhr.status);--%>
<%--//                    window.location.reload();--%>
                <%--}--%>
            <%--});--%>
        <%--})--%>
    <%--})--%>

</script>

</body>
</html>